package com.izhangqian.plugintest;

import android.content.Context;

public class FloatManager {

    private FloatView view;
    private FloatManager() {

    }

    private static class INSTANCE {
        private static FloatManager manager = new FloatManager();
    }

    public static FloatManager getInstance() {
        return INSTANCE.manager;
    }

    public void showWindow(Context context) {
        if (view == null) {
            view = new FloatView(context);
        }
        if (!view.isAttachedToWindow()) {
            view.showWindow();
        }
    }
}
